﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Garden.Model;
using Kaixin.BLL;
using Kaixin.BLL.Helper;
using RegexHelper = Garden.Helper.RegexHelper;

namespace Garden.Func
{
    class PloughMan: WorkMan
    {
        public PloughMan()
        {
            WhichPage = "plough";
        }
        #region IWork 成员
        //犁地
        protected override bool WorkCondition(Farmland land)
        {
            return (land.UID == "0" || land.IsMyLoveFarm) && land.Status == 1 && land.Cropsstatus == "-1";
        }

        protected override void WorkSummary(Farmland land, LogWrite log, string data)
        {
            string val = RegexHelper.GetFirstVal(data, RegexHelper.RetReg);
            log(string.Format("{0}号地：犁地{1}", land.FarmNum, val));
        }

        #endregion
    }
}
